<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 100px;
      height: 100px;
      background-color: chocolate;
      margin-bottom: 10px;
    }
    .demo-1 {
      transition: width 2s linear 1s;
    }
    .demo-1:hover {
      width: 300px;
    }
    .demo-2 {
      transition: width 2s cubic-bezier(0.25, 0.1, 1, -0.06);
    }
    .demo-2:hover {
      width: 300px;
    }
    .demo-3 {
      transition: transform 1s ease-out;
    }
    .demo-3:hover {
      transform: rotate(45deg);
    }
  </style>
</head>
<body>
  <div class="box demo-1"></div>
  <div class="box demo-2"></div>
  <div class="box demo-3"></div>
  <script>
    let runend = () => {console.log('transitionend')}
    let $transtionend = document.querySelector('.demo-1')
    $transtionend.addEventListener('transitionend', runend)
  </script>
</body>
</html>